package com.canton.service.impl;
import com.canton.dao.entity.ClimateNode;
import com.canton.dao.repository.ClimateRepository;
import com.canton.service.ClimateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClimateServiceImpl implements ClimateService {
    @Autowired
    private ClimateRepository climateRepository;


    @Override
    public ClimateNode findByName(String name) {
        return climateRepository.findByName(name);
    }

    @Override
    public List<ClimateNode> findAll() {
        return climateRepository.findAll();
    }

    @Override
    public List<ClimateNode> findByNameLike(String likes) {
        return climateRepository.findByNameLike(likes);
    }
}
